package com.zj.fx.model.month;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.date.DateUtil;
import lombok.Data;

import java.util.Date;

@Data
public class MonthNecessary implements Serializable {
    private static final long serialVersionUID = 1L;


    @ApiModelProperty(value = "id")
    private String id;

    @ApiModelProperty(value = "编号")
    private String num;

    @ApiModelProperty(value = "一级项目")
    private String firstProject;

    @ApiModelProperty(value = "二级项目")
    private String secondProject;

    @ApiModelProperty(value = "检查方式")
    private String testMode;

    @ApiModelProperty(value = "评价周期")
    private String evaluationPeriod;

    @ApiModelProperty(value = "责任部门ID")
    private String resDeptId;

    @ApiModelProperty(value = "责任部门名称")
    private String resDeptName;

    @ApiModelProperty(value = "支撑文件ID")
    private String supportingFileId;

    @ApiModelProperty(value = "支撑文件描述")
    private String supportingFileMemo;

    @ApiModelProperty(value = "自评分是否合格（0否，1是）")
    private Integer typeSelf;

    @ApiModelProperty(value = "分公司审查评分是否合格（0否，1是）")
    private Integer typeSubreview;

    @ApiModelProperty(value = "是否被分公司审核修正（0否/1是）")
    private String isSubauditedit;

    @ApiModelProperty(value = "责任部门审查评分是否合格（0否，1是）")
    private Integer typeReview;

    @ApiModelProperty(value = "是否被责任部门审核修正（0否/1是）")
    private String isAuditedit;

    @ApiModelProperty(value = "审查评分说明")
    private String reviewMemo;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "供电所id")
    private String fkSupplyId;

    @ApiModelProperty(value = "供电所名称")
    private String supplyName;

    @ApiModelProperty(value = "供电所填报任务id")
    private String fkTaskId;

    @ApiModelProperty(value = "任务状态（0未填报/1审核中/2被驳回/3审核完成）")
    private String taskState;

    @ApiModelProperty(value = "驳回原因")
    private String rejectReason;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "驳回时间")
    private Date rejectDate;


    public MonthNecessary(String id, String num, String firstProject, String secondProject, String testMode, String evaluationPeriod, String resDeptId, String resDeptName, String supportingFileId, String supportingFileMemo, Integer typeSelf, Integer typeSubreview, String isSubauditedit, Integer typeReview, String isAuditedit, String reviewMemo, String remark, String fkSupplyId, String supplyName, String fkTaskId, String taskState, String rejectReason, Date rejectDate) {

        this.id = id;

        this.num = num;

        this.firstProject = firstProject;

        this.secondProject = secondProject;

        this.testMode = testMode;

        this.evaluationPeriod = evaluationPeriod;

        this.resDeptId = resDeptId;

        this.resDeptName = resDeptName;

        this.supportingFileId = supportingFileId;

        this.supportingFileMemo = supportingFileMemo;

        this.typeSelf = typeSelf;

        this.typeSubreview = typeSubreview;

        this.isSubauditedit = isSubauditedit;

        this.typeReview = typeReview;

        this.isAuditedit = isAuditedit;

        this.reviewMemo = reviewMemo;

        this.remark = remark;

        this.fkSupplyId = fkSupplyId;

        this.supplyName = supplyName;

        this.fkTaskId = fkTaskId;

        this.taskState = taskState;

        this.rejectReason = rejectReason;

        this.rejectDate = rejectDate;

    }

    public MonthNecessary() {
        super();
    }


    public String dateToStringConvert(Date date) {
        if (date != null) {
            return DateUtil.format(date, "yyyy-MM-dd HH:mm:ss");
        }
        return "";
    }


}